package tech.aistar.day05.test;

import java.util.Arrays;

/**
 * 本类用来演示: 学生实体类
 *
 * @author: success
 * @date: 2021/3/12 2:22 下午
 */
public class Student {
    private int id;

    private String name;

    private String sno;

    //假设一个学生能够被多个老师教
    private Teacher[] teacher;

    public Student() {
    }

    public Student(int id, String name, String sno, Teacher[] teacher) {
        this.id = id;
        this.name = name;
        this.sno = sno;
        this.teacher = teacher;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    public Teacher[] getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher[] teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sno='" + sno + '\'' +
                ", teacher=" + Arrays.toString(teacher) +
                '}';
    }
}
